<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
<script>
    layui.use(['layer', 'table', 'form','laydate'], function () {
        var form = layui.form;
        var layer = layui.layer;
        //网站
        form.on('select(website_id)', function(data) {
            $("#websites_topic_id").html('');
            var id = data.value;
            //栏目数据
            $.post("{{route('admin.websitesTopic.topicData')}}",{'website_id':id},function (d){
                var data = eval(d.data);
                _html="<option value=''>全部</option>";
                $.each(data,function (index,val){
                    _html+="<option value='"+val.id+"'>"+val.topic_name+"</option>";
                });
                console.log(_html);
                $("#websites_topic_id").html(_html);
                form.render('select');
            });
        });
    });
</script>

